﻿@using SAB.Domain.User
@using SAB.Domain.Politica
@{
    ViewBag.Title = "ProfileLibraryUser";
}

<div class="row">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li>@Html.ActionLink("Home", "Index", "Home")</li>
            <li>@Html.ActionLink("Usuario", "Index", "Home")</li>
            <li class="active">Perfil</li>
        </ol>
    </div>
</div>
@{IEnumerable<UserProfile> perfiles = (IEnumerable<UserProfile>)ViewData["perfiles"];}
<div class="col-md-10">
    @if (TempData["message"] != null)
    {
        <div class="alert alert-success" role="alert">@TempData["message"]</div>
    }
    @if (TempData["alert"] != null)
    {
        <div class="alert alert-danger" role="alert">@TempData["alert"]</div>
    }

</div>

@{UserAccount usuario = (UserAccount)ViewData["usuario"];}
<form action="@Url.Action("UpdateSystemLector", "Account", new { id = @usuario.Id })" method="post">
    <div class="row">
        <div class="col-md-10">
            <h1 class="title text-left">Detalle Lector</h1>

            <div class="form-group">

                <div class="form-group">
                    <div class="row">
                        <div class="col-md-6">
                            <label for="exampleInputEmail1">Código</label>
                            <input type="text" class="form-control" value=@usuario.Id disabled="disabled">
                        </div>

                        <div class="col-md-6">
                            <label for="exampleInputEmail1">Nombres</label>
                            <input type="text" class="form-control" value=@usuario.Name.ToString() disabled="disabled">
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <div class="row">
                        <div class="col-md-6">
                            <label for="exampleInputEmail1">Apellido Paterno</label>
                            <input type="text" class="form-control" value=@usuario.Lastname1.ToString() disabled="disabled">
                        </div>

                        <div class="col-md-6">
                            <label for="exampleInputEmail1">Apellido Materno</label>
                            <input type="text" class="form-control" value=@usuario.Lastname2.ToString() disabled="disabled">
                        </div>
                    </div>
                </div>

               



                <div class="form-group">
                    <div class="row">
                        <div class="col-md-6">
                            <label for="exampleInputEmail1">Tipo Documento</label>
                            <input type="text" class="form-control" value="@usuario.Document.Name.ToString()" disabled="disabled">
                        </div>
                        <div class="col-md-6">
                            <label for="exampleInputEmail1">Numero Documento</label>
                            <input type="text" class="form-control" value="@usuario.NumeroDocumento.ToString()" disabled="disabled">
                        </div>

                    </div>
                </div>


                <div class="form-group">
                    <div class="row">
                        <div class="col-md-6">
                            <label for="exampleInputEmail1">Estado</label>
                            <input type="text" class="form-control" value="@usuario.Status.ToString()" disabled="disabled">
                        </div>

                        <div class="col-md-6">
                            <label for="tipo">Tipo Perfil</label>

                            <select required="required" name="tipo" class="form-control">
                                @{

                                int i = 1;
                                foreach (UserProfile r in perfiles)
                                {
                                    if (r.Id == usuario.IdPerfil)
                                    {
                            <option value="@r.Id" selected>@r.Name</option>}
                                    else
                                    {
                            <option value="@r.Id" selected>@r.Name</option>}
                                    i++;
                                }
                                }
                            </select>

                        </div>


                    </div>
                </div>

                <div class="form-group">
                    <div class="row">
                        
                        <div class="col-md-6">
                            <label for="exampleInputEmail1">Correo Electrónico</label>
                            <input type="email" class="form-control" value="@usuario.Correo.ToString()" disabled="disabled">
                        </div>

                    </div>
                </div>






            </div>

            <div class="col-sm-12" style="height:30px;"></div>
            <!--Botones Limpiar, cancelar, guardar-->
            <div class="col-sm-12" style="height:30px;"></div>
            <div class="form-group">
                <div class="col-md-4">
                    <button type="submit" class="btn btn-primary pull-right">
                        Modificar
                    </button>


                </div>


            </div>




        </div>
    </div>



</form>